﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreFrame.Core.Orm;

namespace MarchEstate.Manager.BusinesEntity
{
    [Serializable]
    [Table(TableName = "WY_ItemFeeHead", EntityType = EntityType.Table, IsGB = false)]
    public abstract class AbstractItemFeeHead:CoreFrame.Business.AbstractBusines
    {
        private string _headid;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "HeadId", DataKey = true, IsSingleQuote = true, Match = "Custom:Guid", IsInsert = false)]
        public string HeadId
        {
            get { return _headid; }
            set { _headid = value; }
        }
        private string _ownerid;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "OwnerId", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string OwnerId
        {
            get { return _ownerid; }
            set { _ownerid = value; }
        }
        private string _ownername;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "OwnerName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string OwnerName
        {
            get { return _ownername; }
            set { _ownername = value; }
        }
        private string _srccid;//可以是门面Id、房间ID、停车位Id、客户Id
        /// <summary>
        /// 可以是门面Id、房间ID、停车位Id、客户Id
        /// </summary>
        [Column(FieldName = "SrccId", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string SrccId
        {
            get { return _srccid; }
            set { _srccid = value; }
        }
        private string _srccsonid;//可以是用表Id、车辆Id等
        /// <summary>
        /// 可以是用表Id、车辆Id等
        /// </summary>
        [Column(FieldName = "SrccSonId", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string SrccSonId
        {
            get { return _srccsonid; }
            set { _srccsonid = value; }
        }
        private string _itemcode;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "ItemCode", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string ItemCode
        {
            get { return _itemcode; }
            set { _itemcode = value; }
        }
        private string _itemname;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "ItemName", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string ItemName
        {
            get { return _itemname; }
            set { _itemname = value; }
        }
        private DateTime _lastmaturity;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "Lastmaturity", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public DateTime Lastmaturity
        {
            get { return _lastmaturity; }
            set { _lastmaturity = value; }
        }
        private DateTime _thismaturity;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "Thismaturity", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public DateTime Thismaturity
        {
            get { return _thismaturity; }
            set { _thismaturity = value; }
        }
        private decimal _dosagenum;//用量，水费吨、电费度，物业费1月
        /// <summary>
        /// 用量，水费吨、电费度，物业费1月
        /// </summary>
        [Column(FieldName = "DosageNum", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public decimal DosageNum
        {
            get { return _dosagenum; }
            set { _dosagenum = value; }
        }
        private decimal _price;//单价
        /// <summary>
        /// 单价
        /// </summary>
        [Column(FieldName = "Price", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public decimal Price
        {
            get { return _price; }
            set { _price = value; }
        }
        private decimal _costfee;//应收金额
        /// <summary>
        /// 应收金额
        /// </summary>
        [Column(FieldName = "CostFee", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public decimal CostFee
        {
            get { return _costfee; }
            set { _costfee = value; }
        }
        private decimal _latefee;//滞纳金
        /// <summary>
        /// 滞纳金
        /// </summary>
        [Column(FieldName = "LateFee", DataKey = false, IsSingleQuote = false, Match = "", IsInsert = true)]
        public decimal LateFee
        {
            get { return _latefee; }
            set { _latefee = value; }
        }
        private string _chargeid;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "ChargeID", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string ChargeID
        {
            get { return _chargeid; }
            set { _chargeid = value; }
        }

        private string _SrccItemMemo;//
        /// <summary>
        /// 
        /// </summary>
        [Column(FieldName = "SrccItemMemo", DataKey = false, IsSingleQuote = true, Match = "", IsInsert = true)]
        public string SrccItemMemo
        {
            get { return _SrccItemMemo; }
            set { _SrccItemMemo = value; }
        }

        public abstract List<AbstractItemFeeHead> GetItemFeeHead(string _srccId, string _itemcode);

        public abstract bool UpdateChargeId(string headId, string chargeId);

        public abstract bool CancelChargeId(string chargeId);
    }
}
